/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef __ARCHIVE_DIALOG_H__
#define __ARCHIVE_DIALOG_H__

#include <QtGui/QDialog>
#include <QtGui/QTabWidget>
#include <QtGui/QLineEdit>
#include <QtGui/QListView>
#include <QtGui/QStringListModel>

namespace PQBuilder
{
	
	class ArchiveDialog : 
		public QDialog
	{
		Q_OBJECT
	public:
		static const int DIAGLOG_WIDTH=560;
		static const int DIAGLOG_HEIGHT=350;
		static const int CREATE_TAB_HEIGHT=96;
	public:
		ArchiveDialog(QWidget *parent = 0);
		~ArchiveDialog();

		QStringList getProjectPathes();
signals:
		//emit signals when create archive successed
		void createArchiveSuccessed(QString archiveName);
	public slots:
		void createFileDialog();
		void create();
		void loadProject();
	private:
		void createTabCreate();
	private:
		QTabWidget* _tabWidget;
		QWidget* _createTab;
		QWidget* _openTab;
		QLineEdit* _pathEdit;
		QListView* _projectListView;
		QStringListModel* _projectListModel;
		
	};
}

#endif
